package com.itheima.inputstream;

import java.io.*;

public class CopyDemo {

    public static void main(String[] args) throws IOException {

        BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream("C:\\q.avi"));
        BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new FileOutputStream("D:\\q.avi"));

        int a = -1;
        while ((a = bufferedInputStream.read()) != -1){
            bufferedOutputStream.write(a);
        }

        bufferedInputStream.close();
        bufferedOutputStream.close();

    }
}
